package com.fametal.ui.broadcast;

import com.fametal.ui.activity.ExitActivity;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class ExitBroadcast extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
		String message = intent.getStringExtra("message");
		if(message.equalsIgnoreCase("EXIT")){
			intent.setClass(context, ExitActivity.class);
			intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
			intent.putExtra("message", "EXIT");
			context.startActivity(intent);
		}
	}

}
